Repository navigation
core: a read-only window's Memory panel still offers its writes and says nothing about why - #2277
Conversation
c239506 to
15fa837
Compare
15fa837 to
df54b8a
Compare
|
Ready to merge: the three read-only slices are on one tip,
Measured on that tree: One thing this branch adds beyond the three slices: No linked pull request or claim is replaced by this one; you may merge this tip once its checks are green. |
|
@Birfy — Tier is T1, so no PASS is needed for this one — the red check is Three seats in one PR, each
Author's numbers: the three source fixes plus one build + one Please take this tip for the queue (or run the guard again on it — its earlier run predates the last rebase). |
…ite (ThinkFlowLab#2276, ThinkFlowLab#2279, ThinkFlowLab#2283) Three read-only slices on one branch, because they all end in the same client bundle and the same generated patch split: one build and one generate serve the three. - ThinkFlowLab#2276: the Memory panel no longer offers Remove or the ask form in a read-only window (the host refuses memory-forget and memory-ask), and says why in the host's own sentence; the entries and Regenerate summary still work. - ThinkFlowLab#2279: the details drawer's Settings view draws the host's read-only sentence in the form's place instead of mounting BotSettingsForm, reading the same window lock as the settings page. - ThinkFlowLab#2283: the ask_user card draws no answer control in a read-only window, and keeps the answers it already holds. `src/client/questions.js` is an upstream file FlyBot edits, so it also gains its topic in patches/ds-bot/topics.json — without it generate refuses the whole split. Tests: core/test/memory-panel-readonly.test.js, core/test/details-bot-settings-readonly.test.js, core/test/questions-readonly.test.js.
df54b8a to
bb5a863
Compare
|
@Birfy — review request for PR #2277 at tip It carries three read-only slices on one tip (#2276 memory page, #2279 Bot settings form, #2283 ask_user card), rebased onto Changed since
FlyBot Test's advisory read at this tip (not a gate, your conclusion is): both modes rendered from the real modules — locked details overview 10 controls with no The |
|
Verdict: PASS at bb5a863 Ran at this tip: Red first: the same command with What I checked at the tip
Not run: the bench smoke test — no |
… change (ThinkFlowLab#2265) Fixes ThinkFlowLab#2247 Owner: Dev2 Reviewer: Reviewer Claim-Id: ae99f17f04c0438ca64d71ddcfa6f1e9 Branch: dev/2-readonly-banner-reload Base: 55503e1 Tree: 1795cfb Verified commit: 4cf69b2 Pushed head: 4cf69b2 **Scope** — the read-only sidebar banner (wide and rail forms) carries a `Reload` control outside the live region, and the client can ask for a fresh state answer that is applied even when the revision is unchanged, so a window that has become writable picks the change up without a page reload. Re-tipped onto live main `55503e16b359` (after `ThinkFlowLab#2277`, `ThinkFlowLab#2290` and `ThinkFlowLab#2275`); `core/client.js` and `patches/ds-bot/**` were rebuilt on that base with `generate`, and `docs/subsystems/core-client.md` merged with `ThinkFlowLab#2275`'s kanban line intact — the file is this base plus exactly the `ThinkFlowLab#2247` bullet. The large generated diff is the usual `generate` re-alignment of the client bundle (the same shape `ThinkFlowLab#2277` and `ThinkFlowLab#2275` have); `core/client.js` against this base carries only the `ThinkFlowLab#2247` hunks. **Files** (13, +5996/−4469) - `core/src/client/sidebar.js` — the button in both banner forms - `core/src/client/sources.js`, `core/src/client/index.js` — the fresh request and its in-flight guard - `core/test/client-reload-state.test.js`, `core/test/sidebar-readonly-reload.test.js` — the new cases - `docs/subsystems/core-client.md`, `changelog.d/2247-readonly-banner-reload.fixed.md` - `core/client.js`, `patches/ds-bot/**` — the generated bundle and mirrors **Readings at `4cf69b209` (committed, clean tree)** - `TZ=UTC ARCH_DOCS_BASE=55503e16b359f034d71328f920aae6bbf674e0d1 npm run verify` — exit 0, 8 suites, **4656 tests / 4656 pass / 0 fail**, `arch-docs: OK (13 changed file(s))`. - `node core/scripts/build-client.mjs --check` — exit 0. - `node scripts/ds-bot-patches.mjs check` — `ok 10 patches apply cleanly in order`, `ok core/ equals ds-bot/ + patches/ds-bot/`. - `node scripts/ds-bot-patches.mjs canonical` — `ok patches/ds-bot/ is what generate writes (generate is a no-op)`. - A second `generate` on the committed tree wrote nothing (`git status --porcelain` empty afterwards). - Red first, on the clean `55503e16` tree with only the two new test files: **6 tests / 1 pass / 5 fail** — `sidebar-readonly-reload` red on the Reload control in both shapes, on Reload starting the full-state read, on a failed reload using the sidebar error channel, and on the two-shape style/rail rule; `client-reload-state` red as a file because the sources had no fresh-request pair yet. - Conflict markers: `git grep -nE '^(<{7}|={7}|>{7})' -- docs core patches changelog.d` answers no line (exit 1). **Not run** — oxlint (no binary in the shared `node_modules`) and anything outside the repository's own `verify` chain; no live-runtime probe on this tip. ## Checkpoint <!-- flybot:checkpoint --> ```json { "pr": 2265, "claim": "Dev2", "issue": 2247, "summary": "The read-only sidebar banner now carries a Reload button in both the wide and the rail shape. It sits beside the status line, not inside the role=status region, so the live region stays text. Pressing it runs the client's new reloadTeam action, which asks the host for a whole team read (no since) so an unchanged revision still re-reads readOnly, and the poll stands back while a reload is in flight. Two new test files cover the control in both shapes, the fresh request, the stale-answer rule and the sidebar error channel.", "files": ["core/src/client/sidebar.js", "core/src/client/sources.js", "core/src/client/index.js", "core/test/sidebar-readonly-reload.test.js", "core/test/client-reload-state.test.js", "docs/subsystems/core-client.md", "changelog.d/2247-readonly-banner-reload.fixed.md"], "checks": { "ran": "node --import ./test/harness-resolve.mjs --test test/sidebar-readonly-reload.test.js test/client-reload-state.test.js; node core/scripts/build-client.mjs --check; node scripts/ds-bot-patches.mjs check", "result": "green", "at": "4cf69b209b4980f9efdfc85998c08a11672cf972" }, "next": "none — ready for review" } ``` <!-- /flybot:checkpoint --> Co-authored-by: Dev-2 <dev2@flybot.local>
Fixes #2276
Fixes #2279
Fixes #2283
Three read-only slices on one branch. They all end in the same client bundle and the same generated patch split, so they share one build and one
generate: the alternative was three PRs each rewriting0008-client-bundle.patchand fighting overcore/client.js.What each one fixes
core/src/client/memory-panel.js, +9/−5): a read-only window no longer draws Remove or the ask/update form, both of which the host refuses (memory-forget,memory-ask), and says why in the host's own sentence fromroster.readOnly. The entries themselves and Regenerate summary (a read) keep working. Test:core/test/memory-panel-readonly.test.js(3 tests).core/src/client/details-drawer.js, +5/−3): it draws the host's read-only sentence in the form's place instead of mountingBotSettingsForm, reading the same window lock (lockedWindow) the settings page reads. A writable window keeps the form unchanged. The same file hands the roster back toScheduleSummary: without it the details overview drew its "No scheduled tasks yet. Add one" entry in a read-only window, and that entry opens the create form a locked Settings page does not draw (core: a read-only window still offers every scheduled-task write, and a refused Pause/Resume/Delete says nothing #2232/P-457). The suite for this change now renders the overview path, becausecore/test/schedules-client.test.jscallsScheduleSummarywith a roster of its own and cannot see a call site that forgets one. Test:core/test/details-bot-settings-readonly.test.js(3 tests).core/src/client/questions.js+38/−24,core/src/client/cells.js+1/−1): a read-only window draws no answer control on the card, and the answers it already holds stay readable. Test:core/test/questions-readonly.test.js(6 tests).docs/subsystems/core-client.mdcarries all three bullets, and each change has its own fragment underchangelog.d/(#2276, #2279, #2283).Files
21 files,
+17621/−16580. The semantic change is six files plus three new tests, three changelog fragments and the one-linetopics.jsonmapping; everything else is the generated split:core/client.jsand its0008-client-bundle.patch(a module-order relocation ofquestions.jsandschedules.jsinside the bundle — the bulk of the line count, not new code),0001-core-fixes.patch,0003-flybot-api-client.patch,0012-room-membership.patch, and the three whole-file mirrors underpatches/ds-bot/files/test/.patches/ds-bot/topics.jsonis in the diff for one reason:src/client/questions.jsis an upstream file FlyBot edits, sogeneraterefuses the split until that file has a topic (0003-flybot-api-client), and without that one linecore/cannot be rebuilt.Red first, then green
rostertoScheduleSummary,core/test/details-bot-settings-readonly.test.jswas# tests 3 / # pass 2 / # fail 1,no create entry is drawn in a read-only window— actual['No scheduled tasks yet. Add one'], expected[]. With the roster passed again it is3/3/0.3/3/0and the ask_user card6/6/0on this tip.Evidence, measured on this tip's tree
TZ=UTC node --import ./test/harness-resolve.mjs --test <file>:memory-panel-readonly3/3/0,details-bot-settings-readonly3/3/0,questions-readonly6/6/0(tests/pass/fail).# tests 173 / # pass 173 / # fail 0:memory97/97/0,memory-empty6/6/0,memory-search4/4/0,schedules-client52/52/0,questions2/2/0,settings-readonly-head3/3/0,sidebar-readonly4/4/0,composer-locked2/2/0,readonly-window-reads3/3/0.TZ=UTC npm run verifyat the repo root — exit 0 on this tree (core lint +arch-docs, plugin lint,build-client.mjs --check,ds-bot-patches.mjs check, the core suite and both plugin suites).ARCH_DOCS_BASE=89125458 npm run lint—Found 74 warnings and 0 errors(warnings pre-existing),arch-docs: OK (21 changed file(s)).node scripts/ds-bot-patches.mjs check:node scripts/ds-bot-patches.mjs canonical—ok patches/ds-bot/ is what generate writes (generate is a no-op):generatewas run twice on this tree and the second pass wrote nothing.npm run build(incore/) reproduces the committedcore/client.jsbyte-for-byte: a second build leaves the tree clean.19e206econto89125458after core: the read-only reads test passes on a dry answer — assert each row's own key #2280 merged, andbuild,generate,check,canonicalandverifywere all re-run there.What I did not run
core/index.jsand nocore/src/host/file.Verified head:
bb5a863229103b45a50baec3ca71d3d4e295e4a8(treee43d9a1538ed12b01adad475f2c856ab3fe9418b, single parent891254589abb9aa6ac42bc1bb64874c716648876).